package com.sea.supply.service;



import com.sea.supply.entity.PdfFile;
import com.sea.supply.entity.PdfRead;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.multipart.MultipartFile;

import java.io.InputStream;
import java.net.MalformedURLException;
import java.util.List;

/**
 * @author 陈鸿飞
 */
public interface PdfService {

    /**
     * 新增
     * @param pdfRead
     * @return
     */
    int save(PdfRead pdfRead);

    void findPdfDetailByPlanNo(String planNo) throws MalformedURLException;

    int usave(PdfRead pdfRead);

    List<PdfRead> findBySku(String pdfSku,String createPlanNo,Integer number);

    void newPdf(String planNo,String urlStr) throws MalformedURLException;

    void newPdfSku(String sku,String urlStr) throws MalformedURLException;

    List<PdfRead> findSupplierName(String createPlanNo);

    List<PdfRead> findBySupplierNameCreatePlanNo(String createPlanNo, String pdfSupplierName);

    void importPdfSku(MultipartFile importSession, String fileName, String createPlanNo) throws Exception;

    /**
     * 根据SKU汇总
     * @param importSession
     * @param fileName
     * @param createPlanNo
     * @throws Exception
     */
    void importPdfBySku(MultipartFile importSession, String fileName) throws Exception;

    List<PdfRead> findByPdfPlanNo(PdfFile pdfFile);

    void deleteByPdfPlanNo(String pdfPlanNo);
    Integer clearPdfSku();
    /**
     * 获取SKU分组
     * @return
     */
    List<PdfRead> groupBySku();

    List<PdfRead> queryBySku(String pdfSku);
}
